package alogrithm.tree;

public class NodeVisitor<T> implements Visitor<T> {

	StringBuilder sb=new StringBuilder();
	@Override
	public void visit(Node<T> node) {
		sb.append(node.getData()).append("-->");
	}
	
	public void clear(){
		sb.setLength(0);
	}
	
	public void print(){
		System.out.println(sb);
	}
}
